<template>
  <a-modal
    :title="`测试流水表` + title"
    :width="800"
    destroyOnClose
    centered
    :visible="visible"
    :confirmLoading="loading"
    @ok="visible=!visible"
    @cancel="visible=!visible"
  >
    <a-card :bordered="true">
      <a-descriptions title="">
        <a-descriptions-item label="自增id">{{ model.id }}</a-descriptions-item>
        <a-descriptions-item label="交易流水号">{{ model.transId }}</a-descriptions-item>
        <a-descriptions-item label="交易类型">{{ this.dictFilter(model.transType,'demo_type') }}</a-descriptions-item>
        <a-descriptions-item label="商户号">{{ model.merchantNo }}</a-descriptions-item>
      </a-descriptions>
      <a-divider style="margin-bottom: 32px"/>
      <a-descriptions title="">
        <a-descriptions-item label="订单号">{{ model.orderId }}</a-descriptions-item>
        <a-descriptions-item label="订单日期">{{ model.orderDate }}</a-descriptions-item>
        <a-descriptions-item label="订单说明">{{ model.orderNote }}</a-descriptions-item>
        <a-descriptions-item label="订单金额">{{ this.amountFix(model.orderAmount, 100, 2) }}</a-descriptions-item>
      </a-descriptions>
      <a-divider style="margin-bottom: 32px"/>
      <a-descriptions title="">
        <a-descriptions-item label="手续费">{{ this.amountFix(model.orderFee, 100, 2) }}</a-descriptions-item>
        <a-descriptions-item label="费率">{{ model.orderFeeRate + `%` }}</a-descriptions-item>
        <a-descriptions-item label="通知地址">{{ model.notifyUrl }}</a-descriptions-item>
        <a-descriptions-item label="银行帐号">{{ model.bankAccountNo }}</a-descriptions-item>
      </a-descriptions>
      <a-divider style="margin-bottom: 32px"/>
      <a-descriptions title="">
        <a-descriptions-item label="银行户名">{{ model.bankAccountName }}</a-descriptions-item>
        <a-descriptions-item label="客户手机">{{ model.mobile }}</a-descriptions-item>
        <a-descriptions-item label="证件号码">{{ model.certificateNo }}</a-descriptions-item>
        <a-descriptions-item label="交易状态">{{ this.dictFilter(model.state,'demo_state') }}</a-descriptions-item>
      </a-descriptions>
      <a-divider style="margin-bottom: 32px"/>
      <a-descriptions title="">
        <a-descriptions-item label="创建时间">{{ model.createTime }}</a-descriptions-item>
        <a-descriptions-item label="更新时间">{{ model.updateTime }}</a-descriptions-item>
      </a-descriptions>
      <a-divider style="margin-bottom: 32px"/>
    </a-card>
  </a-modal>
</template>
<script>
  import { baseMixin } from '@/store/app-mixin'
  import detailMixins from '@/utils/mixins/detailMixins'
  import { getInfo } from '@/api/trade/demo'
  export default {
    mixins: [baseMixin, detailMixins],
    data () {
      return {
        demo_type: {},
        demo_state: {},
        genTemp: null
      }
    },
    created () {
      this.getDictValue('demo_type').then(res => {
        this.demo_type = res.data
      })
      this.getDictValue('demo_state').then(res => {
        this.demo_state = res.data
      })
    },
    methods: {
      // 详情查看,mixins调用
      info (record) {
        return getInfo(record, 'transId')
      }
    }
  }
</script>
<style scoped>
</style>
